package com.chenc.unitdemo.jwt.golbal;

/**
 * @ClassName
 * @Describtion:
 * @Author:Chenc
 * @Date:2024/1/4 10:02
 * @Version 1.0
 */
public class BusinessException extends RuntimeException {


    private CodeMsg codeMsg;

    public BusinessException(CodeMsg errorCode) {
        super(errorCode.getMsg());
        this.codeMsg = errorCode;
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public CodeMsg getCodeMsg() {
        return codeMsg;
    }
}
